projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2cc936
)
popovermenu: Fail gracefully if no model
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 4 Nov 2020 19:56:52 +0000
(14:56 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 4 Nov 2020 19:59:32 +0000
(14:59 -0500)
If we don't have a model yet, return FALSE from
gtk_popover_menu_add_custom().
gtk/gtkmenusectionbox.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmenusectionbox.c
b/gtk/gtkmenusectionbox.c
index 9f988d98f52ec035d74c0e8506fc355f728108c9..332252bb51e930830f2fe451010dc421de792c21 100644
(file)
--- a/
gtk/gtkmenusectionbox.c
+++ b/
gtk/gtkmenusectionbox.c
@@
-696,6
+696,8
@@
gtk_menu_section_box_add_custom (GtkPopoverMenu *popover,
stack = gtk_popover_get_child (GTK_POPOVER (popover));
box = GTK_MENU_SECTION_BOX (gtk_stack_get_child_by_name (GTK_STACK (stack), "main"));
+ if (box == NULL)
+ return FALSE;
slot = (GtkWidget *)g_hash_table_lookup (box->custom_slots, id);